<?php include_once('header.php');?>
<div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
			<ul class="breadcrumb">
				<li><a href="/admin/welcome"><i class="icon-home home-icon"></i>首页</a></li>
				<li>日志管理</li>
				<li>佣金列表</li>
			</ul>
		</div>	
		<div class="page-content" style="margin-top:8px;">										
			<div class="alert alert-block alert-success">
				<button type="button" class="close" data-dismiss="alert">
					<i class="icon-remove"></i>
				</button>
				<i class="icon-comment-alt"></i> 说明：此处显示用户金额变换日志。
			</div>
			<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
				<div style="float:left;margin-right:8px;">
					
				</div>
				<div class="page-header" style="height:40px;"></div>
			</div>
			<div class="visible-md visible-lg hidden-sm hidden-xs btn-group" style="margin-bottom:20px;">
                            
				<form  action="/admin/system_money_rizhi/index" method="post">
				<label style="padding-left:10px;font-size:13px;">姓名：</label>
					<input  type="text" id="username" name="username" value="<?php echo $username;?>"/>	
				<label style="padding-left:10px;font-size:13px;">查找类型：</label>	
				<select name="select_type" id="select_type"  >
                        <option  value="or"<?php if($select_type =='or')echo 'selected'; ?>>或</option>
                        <option  value="and" <?php if($select_type =='and')echo 'selected'; ?>>与</option>
                </select>
				<label style="padding-left:10px;font-size:13px;">起始时间：</label>
					<input type="text" class="Wdate " name="start_time" value="<?=$start_time?>" id="start_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
				<label style="padding-left:10px;font-size:13px;">结束时间：</label>
					<input type="text" class="Wdate " name="end_time" value="<?=$end_time?>" id="end_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /> 					
				<a style="padding-left:10px;" id="search">
					<button type="submit" class="btn btn-xs btn-success" style="height:28px;">
						<i class="icon-search nav-search-icon"></i>搜索
					</button>
				</a>
				</form>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="table-header">
						日志列表
					</div>
					<div class="table-responsive">
						<table id="sample-table-2" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>id</th>
									<th>姓名</th>
									<th>等级</th>
									<th>类型</th>
									<th>来自</th>
									<th>金额</th>

									<th>内容</th>
									<th>备注</th>
									<th>时间</th>
								</tr>
							</thead>
						</table>
					</div><!-- /.table-responsive -->
				</div><!-- /span -->
			</div>
		</div>														
	</div>
<?php include_once('content.php');?>
	<script src="/public_source/www/assets/js/jquery.dataTables.min.js"></script>
	<script src="/public_source/www/assets/js/jquery.dataTables.bootstrap.js"></script>
	<script src="/public_source/www/assets/js/jquery-confirm.js"></script>
	<link  rel="stylesheet" href="/public_source/www/css/insure.css" />
	<link  rel="stylesheet" href="/public_source/www/assets/css/jquery-confirm.css" />
	<link  rel="stylesheet" href="/public_source/www/css/confirm.css" />
	<script src="/public_source/www/My97DatePicker/WdatePicker.js"></script>
<?php include_once('footer.php');?>	
<script type="text/javascript">
	var message = <?php echo $message;?>;
	if(message == 2) {var con = '修改成功,请确定';}else if(message == 3){var con = '修改失败,请重试';}else if(message ==4){var con = '添加成功,请确认';}else {var con = '添加失败,请重试';};
	if(message != 1) {
		$.alert({
		    title: '提示',
		    content: con,
		    confirm: function(){
		    	window.location.replace('/admin/system_money_rizhi/index');
		    }
		});
	}
	jQuery(function($) {
		var title = $("#title").val(); 
		var username = $("#username").val();
		var select_type = $("#select_type").val();
		var start_time = $("#start_time").val();
		var end_time = $("#end_time").val(); 
		var oTable1 = $('#sample-table-2').dataTable({ 
	        "oLanguage": {
	                "sUrl": "/public_source/www/assets/language/zh_CN.json"
	         },			     	
			"aaSorting": [[ 0, "desc" ]],
			"bAutoWidth": false, 
			"bProcessing": true, //开启读取服务器数据时显示正在加载中……特别是大数据量的时候，开启此功能比较好
            "bServerSide": true, //开启服务器模式，使用服务器端处理配置datatable。注意：sAjaxSource参数也必须被给予为了给datatable源代码来获取所需的数据对于每个画。 这个翻译有点别扭。开启此模式后，你对datatables的每个操作 每页显示多少条记录、下一页、上一页、排序（表头）、搜索，这些都会传给服务器相应的值。 
            "sAjaxSource": "/admin/system_money_rizhi/ajax_money_log_list?username="+username+"&select_type="+select_type+"&start_time="+start_time+"&end_time="+end_time, //给服务器发请求的url
            "aoColumns": [ //这个属性下的设置会应用到所有列，按顺序没有是空
                {"mData": 'id'}, //mData 表示发请求时候本列的列明，返回的数据中相同下标名字的数据会填充到这一列
                {"mData": 'true_name'},
				{"mData": 'user_level_name'},
				{"mData": 'type'},


				{"mData": 'from_user_name'},
                {"mData": 'money'},


                {"mData": 'remark'},
                {"mData": 'bonus_remark'},
                {"mData": 'create_time'},
            ],
            "aoColumnDefs": [//和aoColums类似，但他可以给指定列附近爱属性
               {"bSortable": false, "aTargets": [4]},//这句话意思是第1,3,6,7,8,9列（从0开始算） 不能排序
        	]
		});
	});
</script>
